<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
    <!-- Loading Bootstrap -->
    <link href="Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
    <!-- Loading Flat UI -->
    <link href="Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
    <link rel="shortcut icon" href="Public/Admin/Flat/img/favicon.ico">
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
    <!--[if lt IE 9]>
    <script src="dist/js/vendor/html5shiv.js"></script>
    <script src="dist/js/vendor/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="alert alert-success">管理员列表</div>
<table class="table table-hover">
    <tr>
        <th width="30">aid</th>
        <th>用户名</th>
        <th>邮箱</th>
        <th>状态</th>
        <th width="150">登录时间</th>
        <th>登陆ip</th>
        <th>权限</th>
        <th width="210">操作</th>
    </tr>
    <?php foreach ($adminData as $v){?>
    <tr>
        <td><?php echo $v['aid']?></td>
        <td><?php echo $v['username']?></td>
        <td><?php echo $v['email']?></td>
        <td><?php if($v['status']==1){?>
                在线<?php }else{?>离线
               <?php }?></td>
        <td><?php echo date("Y/m/d H:i:s",$v['time'])?></td>
        <td><?php echo $v['loginip']?></td>
        <td><?php if($v['username']!='admin'){?>
                
                <a  href="<?php echo U('authority',array('aid'=>$v['aid']))?>" class="btn btn-sm btn-warning">管理权限</a>
           <?php }else{?>
            <a  href="javascript:;">不可修改！</a>
           
               <?php }?>
            </td>
        <?php if($v['username']!='admin'){?>
                
        <td>
            <a href="javascript:if(confirm('确认删除吗？')) location.href='<?php echo U('deluser',array('aid'=>$v['aid']))?>';" class="btn btn-sm btn-danger">删除</a>
        </td>
        <?php }else{?>
        <td>
            <a href="javascript:;">不能操作！</a>
        </td>
        
               <?php }?>
    </tr>
    <?php }?>
</table>
<a href="<?php echo U('addauser')?>" class="btn btn-primary btn-block">添加新管理员</a>

</body>
</html>